<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>加油优惠价格计算</title>
</head>

<body>
    <script>
        var number = prompt("请输入汽油编号");
        var liters = prompt("请输入你要加多少？")
        var price = 0;
        if (number == '92') {
            if (liters >= 20) {
                price = liters * 5.9;
                document.write("汽油5.9元一升；" + "<br/>" + "共计：" + price + "元");
            } else {
                price = 6 * liters;
                document.write("汽油6元一升；" + "<br/>" + "共计：" + price + "元");
            }
        } else if (number == '97') {
            if (liters >= 40) {
                price = liters * 6.5;
                ddocument.write("汽油6.5元一升；" + "<br/>" + "共计：" + price + "元");
            } else {
                price = liters * 7;
                document.write("汽油7元一升；" + "<br/>" + "共计：" + price + "元");
            }
        }
    </script>
</body>

</html>